import request from '@/utils/request'

// 查询列表
export function listIncome(query) {
  return request({
    url: '/system/income/list',
    method: 'get',
    params: query
  })
}

// 提交结算生成
export function settleaccount(data) {
  return request({
    url: '/system/income/settleaccount',
    method: 'post',
    data: data
  })
}

// 查询详细
export function getIncome(advIncomeId) {
  return request({
    url: '/system/income/' + advIncomeId,
    method: 'get'
  })
}

// 新增
export function addIncome(data) {
  return request({
    url: '/system/income',
    method: 'post',
    data: data
  })
}

// 修改
export function updateIncome(data) {
  return request({
    url: '/system/income',
    method: 'put',
    data: data
  })
}

// 删除
export function delIncome(advIncomeId) {
  return request({
    url: '/system/income/' + advIncomeId,
    method: 'delete'
  })
}

// 批量审批
export function batchSelect(data) {
  return request({
    url: '/system/income/batchSelect',
    method: 'post',
    data: data
  })
}

//分账
export function payShare(data) {
  return request({
    url: '/system/wx-pay/payShare',
    method: 'post',
    data: data
  })
}

export function batchPayShare(data) {
  return request({
    url: '/system/wx-pay/batchPayShare',
    method: 'post',
    data: data
  })
}